#include "PAP_defs.h"
#include "derivative.h"

#define BUTTON_GREEN         PTBD_PTBD7            
#define BUTTON_RED           PTBD_PTBD6
#define BUTTON_BLUE          PTBD_PTBD5
#define BUTTON_YELLOW        PTBD_PTBD4

#define BUTTON_GREEN_DD      PTBDD_PTBDD7
#define BUTTON_RED_DD        PTBDD_PTBDD6
#define BUTTON_BLUE_DD       PTBDD_PTBDD5
#define BUTTON_YELLOW_DD     PTBDD_PTBDD4

#define BUTTON_GREEN_PULLUP  PTBPE_PTBPE7
#define BUTTON_RED_PULLUP    PTBPE_PTBPE6
#define BUTTON_BLUE_PULLUP   PTBPE_PTBPE5
#define BUTTON_YELLOW_PULLUP PTBPE_PTBPE4

#define PULLUP_ENABLED  1
#define PULLUP_DISABLED 0

#define BUTTON_STATE_FREE       0
#define BUTTON_STATE_PRESSED    1

void vfnButton_GPIO_Setup (void);

void vfnButton_StateInit (void);

uint8 u8Button_Read (void);
